package com.chengzhi.structure;


/**
 * @description: test
 * @author: ruanchengzhi
 * @create: 2019-12-05 09:03
 **/
public class BSTTest {
    public static void main(String[] args) {
        BST<Integer> bst = new BST<>();
        int[] nums = {2, 6,9,3,1};
        for (int i = 0; i < nums.length; i++) {
            bst.add(nums[i]);
        }
        /*bst.deleteMinNode();
        bst.preOrder();
        System.out.println("---------");
        bst.deleteMaxNode();
        bst.preOrder();*/
        bst.deleteNode(2);
        bst.preOrder();

    }
}
